package cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.controller;


import cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.entity.Subject;
import cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.service.SubjectServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class SubjectController {
    @Autowired
    private SubjectServiceImpl subjectService;
    @GetMapping("/subject")
    public List<Subject> getAllSubject(){
        return subjectService.getAllSubjects();
    }
}
